package org.jeecg.modules.message.controller;



import org.jeecg.common.api.dto.sms.SendSmsDTO;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.Sign;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.modules.message.service.ISmsSendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import lombok.extern.slf4j.Slf4j;

import javax.validation.Valid;


@RestController
@RequestMapping("/sms")
@Slf4j
public class SmsSendController {

	@Autowired
	private ISmsSendService smsSendService;


	@Sign
	@PostMapping(value = "/sendSms")
	public Result<String> send(@RequestBody @Valid SendSmsDTO sendSmsDTO) {

		return Result.OK( smsSendService.sendSms(sendSmsDTO));
	}

}
